<template>
<view class="hospitalList-headerTab">
	<view class="hospitalList-headerTab-left">
		<text>江苏省</text>
		<image :src="`${prefix_image}/homepage/IntegralRecord/hospital-bottom.png`" mode="aspectFit"/>
	</view>
	<view class="hospitalList-headerTab-right">
		<text>南京市</text>
		<image :src="`${prefix_image}/homepage/IntegralRecord/hospital-bottom.png`" mode="aspectFit"/>
	</view>
</view>
<view class="hospitalList-content">
	<view class="hospitalList-outer">
		<view class="hospitalList">
			<view class="hospitalList-left">
				<image :src="`${prefix_image}/homepage/IntegralRecord/IntegralCurrency.png`" mode="aspectFit"/>
			</view>
			<view class="hospitalList-center">
				<view class="hospitalList-center-title">瑞鹏宠物医院（三林分院）</view>
				<view class="hospitalList-center-address">浦锦路309弄3号</view>
				<view class="hospitalList-center-time">营业时间: 周一至周日 08:30-22:00</view>
			</view>
			<view class="hospitalList-right">
				<view class="hospitalList-right-icon">连锁</view>
				<view class="hospitalList-right-address">7.3km</view>
			</view>
		</view>
	</view>
	<view class="hospitalList-outer active">
		<view class="hospitalList ">
			<view class="hospitalList-left">
				<image :src="`${prefix_image}/homepage/IntegralRecord/IntegralCurrency.png`" mode="aspectFit"/>
			</view>
			<view class="hospitalList-center">
				<view class="hospitalList-center-title">瑞鹏宠物医院（三林分院）</view>
				<view class="hospitalList-center-address">浦锦路309弄3号</view>
				<view class="hospitalList-center-time">营业时间: 周一至周日 08:30-22:00</view>
			</view>
			<view class="hospitalList-right">
				<view class="hospitalList-right-icon">连锁</view>
				<view class="hospitalList-right-address">7.3km</view>
			</view>
		</view>
	</view>
</view>
<view class="bottom-button-outer" @tap="goToRegister()">
	<view class="bottom-button">
		{{isOnline === "true" ? "去预约" : "去挂号"}}
	</view>
</view>

</template>

<script setup>
import config from '@/hooks/useConfig.js'
const props = defineProps({
	isOnline: String
})  

const { prefix_image }=config()

const goToRegister = () => {
	if(props.isOnline === "true"){
		uni.navigateTo({
			// 预约
			url:'/pages/appointment/index',
		})
	}else{
		uni.navigateTo({
			// 去挂号 
			url:'/pages/selectService/index',
		})
	}
}

</script>

<style lang="stylus" scoped>
	.hospitalList-headerTab{
		display: flex;
		height: 90rpx;
		// line-height: 90rpx;
		background-color: #FFD300;
		.hospitalList-headerTab-left{
			flex: 1;
			font-size: 26rpx;
			// font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #333333;
			display: flex;
			align-items: center;
			text{
				margin-left: 163rpx;
			}
			image{
				width: 24rpx;
				height: 24rpx;
				padding-left 12rpx;
			}
		}
		.hospitalList-headerTab-right{
			flex: 1;
			font-size: 26rpx;
			// font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #333333;
			display: flex;
			align-items: center;
			text{
				margin-left: 98rpx;
			}
			image{
				width: 24rpx;
				height: 24rpx;
				padding-left: 12rpx;
			}
		}
	}
	
	.hospitalList-outer.active{
		background: #F7F7F7;
		.hospitalList{
			background: #F7F7F7;
		}
	}
	.hospitalList-content{
		.hospitalList{
			background-color: #FFFFFF;
			// height: 280rpx;
			padding: 48rpx 0rpx 48rpx 0rpx;
			display: flex;
			border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
			box-sizing: border-box;
			margin: 0rpx 32rpx;
			.hospitalList-left{
				image{
					border-radius: 50%;
					width: 90rpx;
					height: 90rpx;
				}
			}
			.hospitalList-center{
				display: flex;
				flex-direction: column;
				margin-left: 20rpx;
				flex: 1;
				.hospitalList-center-title{
					font-size: 32rpx;
					font-weight: 600;
					color: #333333;
				}
				.hospitalList-center-address{
					font-size: 24rpx;
					font-weight: 400;
					color: #999999;
					margin-top: 16rpx;
				}
				.hospitalList-center-time{
					font-size: 24rpx;
					font-weight: 400;
					color: #333333;
					padding-top: 20rpx;
				}
			}
			.hospitalList-right{
				.hospitalList-right-icon{
					width: 64rpx;
					height: 32rpx;
					background: rgba(255,65,60, 0.1);
					border-radius: 4rpx;
					font-size: 22rpx;
					font-weight: 400;
					color: #FF413C;
					text-align: center;
					line-height: 32rpx;
					margin-bottom: 18rpx;
				}
				.hospitalList-right-address{
					font-size: 22rpx;
					// font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #999999;
				}
			}
		}
		
		
	}
	
	.bottom-button-outer{
		display: flex;
		width: 100%;
		justify-content: center;
		.bottom-button{
			width: 600rpx;
			height: 96rpx;
			background: #FFD300;
			border-radius: 48rpx;
			font-size: 32rpx;
			font-weight: 600;
			color: #111111;
			text-align: center;
			line-height: 96rpx;
			position: fixed;
			bottom: 68rpx;
		}
	}
	
</style>
